﻿<template>
  <a-modal
    :title="title"
    width="40%"
    :visible="visible"
    :confirmLoading="loading"
    @ok="handleSubmit"
    @cancel="()=>{this.visible=false}"
  >
    <a-spin :spinning="loading">
      <a-form-model ref="form" :model="entity" :rules="rules" v-bind="layout">
        <a-form-model-item label="code" prop="code">
          <a-input v-model="entity.code" autocomplete="off" placeholder="code" />
        </a-form-model-item>
        <a-form-model-item label="name" prop="name">
          <a-input v-model="entity.name" autocomplete="off" placeholder="name" />
        </a-form-model-item>
        <a-form-model-item label="shorthand" prop="shorthand">
          <a-input v-model="entity.shorthand" autocomplete="off" placeholder="shorthand" />
        </a-form-model-item>
        <a-form-model-item label="specification" prop="specification">
          <a-input v-model="entity.specification" autocomplete="off" placeholder="specification" />
        </a-form-model-item>
        <a-form-model-item label="procureBatch" prop="procureBatch">
          <a-input v-model="entity.procureBatch" autocomplete="off" placeholder="procureBatch" />
        </a-form-model-item>
        <a-form-model-item label="invSCost" prop="invSCost">
          <a-input v-model="entity.invSCost" autocomplete="off" placeholder="invSCost" />
        </a-form-model-item>
        <a-form-model-item label="latestCost_Abandon" prop="latestCost_Abandon">
          <a-input v-model="entity.latestCost_Abandon" autocomplete="off" placeholder="latestCost_Abandon" />
        </a-form-model-item>
        <a-form-model-item label="avagCost_Abandon" prop="avagCost_Abandon">
          <a-input v-model="entity.avagCost_Abandon" autocomplete="off" placeholder="avagCost_Abandon" />
        </a-form-model-item>
        <a-form-model-item label="isLimitedWithdraw" prop="isLimitedWithdraw">
          <a-input v-model="entity.isLimitedWithdraw" autocomplete="off" placeholder="isLimitedWithdraw" />
        </a-form-model-item>
        <a-form-model-item label="isBatch" prop="isBatch">
          <a-input v-model="entity.isBatch" autocomplete="off" placeholder="isBatch" />
        </a-form-model-item>
        <a-form-model-item label="isQualityPeriod" prop="isQualityPeriod">
          <a-input v-model="entity.isQualityPeriod" autocomplete="off" placeholder="isQualityPeriod" />
        </a-form-model-item>
        <a-form-model-item label="isSale" prop="isSale">
          <a-input v-model="entity.isSale" autocomplete="off" placeholder="isSale" />
        </a-form-model-item>
        <a-form-model-item label="isMadeSelf" prop="isMadeSelf">
          <a-input v-model="entity.isMadeSelf" autocomplete="off" placeholder="isMadeSelf" />
        </a-form-model-item>
        <a-form-model-item label="isPurchase" prop="isPurchase">
          <a-input v-model="entity.isPurchase" autocomplete="off" placeholder="isPurchase" />
        </a-form-model-item>
        <a-form-model-item label="isMaterial" prop="isMaterial">
          <a-input v-model="entity.isMaterial" autocomplete="off" placeholder="isMaterial" />
        </a-form-model-item>
        <a-form-model-item label="lowQuantity" prop="lowQuantity">
          <a-input v-model="entity.lowQuantity" autocomplete="off" placeholder="lowQuantity" />
        </a-form-model-item>
        <a-form-model-item label="topQuantity" prop="topQuantity">
          <a-input v-model="entity.topQuantity" autocomplete="off" placeholder="topQuantity" />
        </a-form-model-item>
        <a-form-model-item label="safeQuantity" prop="safeQuantity">
          <a-input v-model="entity.safeQuantity" autocomplete="off" placeholder="safeQuantity" />
        </a-form-model-item>
        <a-form-model-item label="picture" prop="picture">
          <a-input v-model="entity.picture" autocomplete="off" placeholder="picture" />
        </a-form-model-item>
        <a-form-model-item label="disabled" prop="disabled">
          <a-input v-model="entity.disabled" autocomplete="off" placeholder="disabled" />
        </a-form-model-item>
        <a-form-model-item label="isQualityCheck" prop="isQualityCheck">
          <a-input v-model="entity.isQualityCheck" autocomplete="off" placeholder="isQualityCheck" />
        </a-form-model-item>
        <a-form-model-item label="isMadeRequest" prop="isMadeRequest">
          <a-input v-model="entity.isMadeRequest" autocomplete="off" placeholder="isMadeRequest" />
        </a-form-model-item>
        <a-form-model-item label="isSingleUnit" prop="isSingleUnit">
          <a-input v-model="entity.isSingleUnit" autocomplete="off" placeholder="isSingleUnit" />
        </a-form-model-item>
        <a-form-model-item label="ts" prop="ts">
          <a-input v-model="entity.ts" autocomplete="off" placeholder="ts" />
        </a-form-model-item>
        <a-form-model-item label="updatedBy" prop="updatedBy">
          <a-input v-model="entity.updatedBy" autocomplete="off" placeholder="updatedBy" />
        </a-form-model-item>
        <a-form-model-item label="Userfreeitem7" prop="Userfreeitem7">
          <a-input v-model="entity.Userfreeitem7" autocomplete="off" placeholder="Userfreeitem7" />
        </a-form-model-item>
        <a-form-model-item label="Userfreeitem6" prop="Userfreeitem6">
          <a-input v-model="entity.Userfreeitem6" autocomplete="off" placeholder="Userfreeitem6" />
        </a-form-model-item>
        <a-form-model-item label="Userfreeitem2" prop="Userfreeitem2">
          <a-input v-model="entity.Userfreeitem2" autocomplete="off" placeholder="Userfreeitem2" />
        </a-form-model-item>
        <a-form-model-item label="Userfreeitem1" prop="Userfreeitem1">
          <a-input v-model="entity.Userfreeitem1" autocomplete="off" placeholder="Userfreeitem1" />
        </a-form-model-item>
        <a-form-model-item label="Userfreeitem9" prop="Userfreeitem9">
          <a-input v-model="entity.Userfreeitem9" autocomplete="off" placeholder="Userfreeitem9" />
        </a-form-model-item>
        <a-form-model-item label="Userfreeitem0" prop="Userfreeitem0">
          <a-input v-model="entity.Userfreeitem0" autocomplete="off" placeholder="Userfreeitem0" />
        </a-form-model-item>
        <a-form-model-item label="Userfreeitem8" prop="Userfreeitem8">
          <a-input v-model="entity.Userfreeitem8" autocomplete="off" placeholder="Userfreeitem8" />
        </a-form-model-item>
        <a-form-model-item label="Userfreeitem5" prop="Userfreeitem5">
          <a-input v-model="entity.Userfreeitem5" autocomplete="off" placeholder="Userfreeitem5" />
        </a-form-model-item>
        <a-form-model-item label="Userfreeitem4" prop="Userfreeitem4">
          <a-input v-model="entity.Userfreeitem4" autocomplete="off" placeholder="Userfreeitem4" />
        </a-form-model-item>
        <a-form-model-item label="Userfreeitem3" prop="Userfreeitem3">
          <a-input v-model="entity.Userfreeitem3" autocomplete="off" placeholder="Userfreeitem3" />
        </a-form-model-item>
        <a-form-model-item label="MustInputFreeitem7" prop="MustInputFreeitem7">
          <a-input v-model="entity.MustInputFreeitem7" autocomplete="off" placeholder="MustInputFreeitem7" />
        </a-form-model-item>
        <a-form-model-item label="MustInputFreeitem2" prop="MustInputFreeitem2">
          <a-input v-model="entity.MustInputFreeitem2" autocomplete="off" placeholder="MustInputFreeitem2" />
        </a-form-model-item>
        <a-form-model-item label="MustInputFreeitem6" prop="MustInputFreeitem6">
          <a-input v-model="entity.MustInputFreeitem6" autocomplete="off" placeholder="MustInputFreeitem6" />
        </a-form-model-item>
        <a-form-model-item label="MustInputFreeitem3" prop="MustInputFreeitem3">
          <a-input v-model="entity.MustInputFreeitem3" autocomplete="off" placeholder="MustInputFreeitem3" />
        </a-form-model-item>
        <a-form-model-item label="MustInputFreeitem5" prop="MustInputFreeitem5">
          <a-input v-model="entity.MustInputFreeitem5" autocomplete="off" placeholder="MustInputFreeitem5" />
        </a-form-model-item>
        <a-form-model-item label="MustInputFreeitem4" prop="MustInputFreeitem4">
          <a-input v-model="entity.MustInputFreeitem4" autocomplete="off" placeholder="MustInputFreeitem4" />
        </a-form-model-item>
        <a-form-model-item label="MustInputFreeitem9" prop="MustInputFreeitem9">
          <a-input v-model="entity.MustInputFreeitem9" autocomplete="off" placeholder="MustInputFreeitem9" />
        </a-form-model-item>
        <a-form-model-item label="MustInputFreeitem1" prop="MustInputFreeitem1">
          <a-input v-model="entity.MustInputFreeitem1" autocomplete="off" placeholder="MustInputFreeitem1" />
        </a-form-model-item>
        <a-form-model-item label="MustInputFreeitem8" prop="MustInputFreeitem8">
          <a-input v-model="entity.MustInputFreeitem8" autocomplete="off" placeholder="MustInputFreeitem8" />
        </a-form-model-item>
        <a-form-model-item label="MustInputFreeitem0" prop="MustInputFreeitem0">
          <a-input v-model="entity.MustInputFreeitem0" autocomplete="off" placeholder="MustInputFreeitem0" />
        </a-form-model-item>
        <a-form-model-item label="produceBatch" prop="produceBatch">
          <a-input v-model="entity.produceBatch" autocomplete="off" placeholder="produceBatch" />
        </a-form-model-item>
        <a-form-model-item label="imageFile" prop="imageFile">
          <a-input v-model="entity.imageFile" autocomplete="off" placeholder="imageFile" />
        </a-form-model-item>
        <a-form-model-item label="priuserdefnvc1" prop="priuserdefnvc1">
          <a-input v-model="entity.priuserdefnvc1" autocomplete="off" placeholder="priuserdefnvc1" />
        </a-form-model-item>
        <a-form-model-item label="priuserdefdecm1" prop="priuserdefdecm1">
          <a-input v-model="entity.priuserdefdecm1" autocomplete="off" placeholder="priuserdefdecm1" />
        </a-form-model-item>
        <a-form-model-item label="priuserdefnvc2" prop="priuserdefnvc2">
          <a-input v-model="entity.priuserdefnvc2" autocomplete="off" placeholder="priuserdefnvc2" />
        </a-form-model-item>
        <a-form-model-item label="priuserdefdecm2" prop="priuserdefdecm2">
          <a-input v-model="entity.priuserdefdecm2" autocomplete="off" placeholder="priuserdefdecm2" />
        </a-form-model-item>
        <a-form-model-item label="priuserdefnvc3" prop="priuserdefnvc3">
          <a-input v-model="entity.priuserdefnvc3" autocomplete="off" placeholder="priuserdefnvc3" />
        </a-form-model-item>
        <a-form-model-item label="priuserdefdecm3" prop="priuserdefdecm3">
          <a-input v-model="entity.priuserdefdecm3" autocomplete="off" placeholder="priuserdefdecm3" />
        </a-form-model-item>
        <a-form-model-item label="priuserdefnvc4" prop="priuserdefnvc4">
          <a-input v-model="entity.priuserdefnvc4" autocomplete="off" placeholder="priuserdefnvc4" />
        </a-form-model-item>
        <a-form-model-item label="priuserdefdecm4" prop="priuserdefdecm4">
          <a-input v-model="entity.priuserdefdecm4" autocomplete="off" placeholder="priuserdefdecm4" />
        </a-form-model-item>
        <a-form-model-item label="priuserdefnvc5" prop="priuserdefnvc5">
          <a-input v-model="entity.priuserdefnvc5" autocomplete="off" placeholder="priuserdefnvc5" />
        </a-form-model-item>
        <a-form-model-item label="priuserdefdecm5" prop="priuserdefdecm5">
          <a-input v-model="entity.priuserdefdecm5" autocomplete="off" placeholder="priuserdefdecm5" />
        </a-form-model-item>
        <a-form-model-item label="standardturnoverdays" prop="standardturnoverdays">
          <a-input v-model="entity.standardturnoverdays" autocomplete="off" placeholder="standardturnoverdays" />
        </a-form-model-item>
        <a-form-model-item label="HasEverChanged" prop="HasEverChanged">
          <a-input v-model="entity.HasEverChanged" autocomplete="off" placeholder="HasEverChanged" />
        </a-form-model-item>
        <a-form-model-item label="pickbatch" prop="pickbatch">
          <a-input v-model="entity.pickbatch" autocomplete="off" placeholder="pickbatch" />
        </a-form-model-item>
        <a-form-model-item label="isphantom" prop="isphantom">
          <a-input v-model="entity.isphantom" autocomplete="off" placeholder="isphantom" />
        </a-form-model-item>
        <a-form-model-item label="ControlRangeFreeitem0" prop="ControlRangeFreeitem0">
          <a-input v-model="entity.ControlRangeFreeitem0" autocomplete="off" placeholder="ControlRangeFreeitem0" />
        </a-form-model-item>
        <a-form-model-item label="ControlRangeFreeitem1" prop="ControlRangeFreeitem1">
          <a-input v-model="entity.ControlRangeFreeitem1" autocomplete="off" placeholder="ControlRangeFreeitem1" />
        </a-form-model-item>
        <a-form-model-item label="ControlRangeFreeitem2" prop="ControlRangeFreeitem2">
          <a-input v-model="entity.ControlRangeFreeitem2" autocomplete="off" placeholder="ControlRangeFreeitem2" />
        </a-form-model-item>
        <a-form-model-item label="ControlRangeFreeitem3" prop="ControlRangeFreeitem3">
          <a-input v-model="entity.ControlRangeFreeitem3" autocomplete="off" placeholder="ControlRangeFreeitem3" />
        </a-form-model-item>
        <a-form-model-item label="ControlRangeFreeitem4" prop="ControlRangeFreeitem4">
          <a-input v-model="entity.ControlRangeFreeitem4" autocomplete="off" placeholder="ControlRangeFreeitem4" />
        </a-form-model-item>
        <a-form-model-item label="ControlRangeFreeitem5" prop="ControlRangeFreeitem5">
          <a-input v-model="entity.ControlRangeFreeitem5" autocomplete="off" placeholder="ControlRangeFreeitem5" />
        </a-form-model-item>
        <a-form-model-item label="ControlRangeFreeitem6" prop="ControlRangeFreeitem6">
          <a-input v-model="entity.ControlRangeFreeitem6" autocomplete="off" placeholder="ControlRangeFreeitem6" />
        </a-form-model-item>
        <a-form-model-item label="ControlRangeFreeitem7" prop="ControlRangeFreeitem7">
          <a-input v-model="entity.ControlRangeFreeitem7" autocomplete="off" placeholder="ControlRangeFreeitem7" />
        </a-form-model-item>
        <a-form-model-item label="ControlRangeFreeitem8" prop="ControlRangeFreeitem8">
          <a-input v-model="entity.ControlRangeFreeitem8" autocomplete="off" placeholder="ControlRangeFreeitem8" />
        </a-form-model-item>
        <a-form-model-item label="ControlRangeFreeitem9" prop="ControlRangeFreeitem9">
          <a-input v-model="entity.ControlRangeFreeitem9" autocomplete="off" placeholder="ControlRangeFreeitem9" />
        </a-form-model-item>
        <a-form-model-item label="IsLaborCost" prop="IsLaborCost">
          <a-input v-model="entity.IsLaborCost" autocomplete="off" placeholder="IsLaborCost" />
        </a-form-model-item>
        <a-form-model-item label="BatchRunNumber" prop="BatchRunNumber">
          <a-input v-model="entity.BatchRunNumber" autocomplete="off" placeholder="BatchRunNumber" />
        </a-form-model-item>
        <a-form-model-item label="IsNew" prop="IsNew">
          <a-input v-model="entity.IsNew" autocomplete="off" placeholder="IsNew" />
        </a-form-model-item>
        <a-form-model-item label="MadeRecordDate" prop="MadeRecordDate">
          <a-input v-model="entity.MadeRecordDate" autocomplete="off" placeholder="MadeRecordDate" />
        </a-form-model-item>
        <a-form-model-item label="InventoryDescript" prop="InventoryDescript">
          <a-input v-model="entity.InventoryDescript" autocomplete="off" placeholder="InventoryDescript" />
        </a-form-model-item>
        <a-form-model-item label="ReNewGoodSellDays" prop="ReNewGoodSellDays">
          <a-input v-model="entity.ReNewGoodSellDays" autocomplete="off" placeholder="ReNewGoodSellDays" />
        </a-form-model-item>
        <a-form-model-item label="ReNewGoodAheadDays" prop="ReNewGoodAheadDays">
          <a-input v-model="entity.ReNewGoodAheadDays" autocomplete="off" placeholder="ReNewGoodAheadDays" />
        </a-form-model-item>
        <a-form-model-item label="IsSuite" prop="IsSuite">
          <a-input v-model="entity.IsSuite" autocomplete="off" placeholder="IsSuite" />
        </a-form-model-item>
        <a-form-model-item label="IsWeigh" prop="IsWeigh">
          <a-input v-model="entity.IsWeigh" autocomplete="off" placeholder="IsWeigh" />
        </a-form-model-item>
        <a-form-model-item label="DefaultBarCode" prop="DefaultBarCode">
          <a-input v-model="entity.DefaultBarCode" autocomplete="off" placeholder="DefaultBarCode" />
        </a-form-model-item>
        <a-form-model-item label="NewProductPeriod" prop="NewProductPeriod">
          <a-input v-model="entity.NewProductPeriod" autocomplete="off" placeholder="NewProductPeriod" />
        </a-form-model-item>
        <a-form-model-item label="Expired" prop="Expired">
          <a-input v-model="entity.Expired" autocomplete="off" placeholder="Expired" />
        </a-form-model-item>
        <a-form-model-item label="idbarcodesolution" prop="idbarcodesolution">
          <a-input v-model="entity.idbarcodesolution" autocomplete="off" placeholder="idbarcodesolution" />
        </a-form-model-item>
        <a-form-model-item label="id" prop="id">
          <a-input v-model="entity.id" autocomplete="off" placeholder="id" />
        </a-form-model-item>
        <a-form-model-item label="idinventoryclass" prop="idinventoryclass">
          <a-input v-model="entity.idinventoryclass" autocomplete="off" placeholder="idinventoryclass" />
        </a-form-model-item>
        <a-form-model-item label="idinvlocation" prop="idinvlocation">
          <a-input v-model="entity.idinvlocation" autocomplete="off" placeholder="idinvlocation" />
        </a-form-model-item>
        <a-form-model-item label="idMarketingOrgan" prop="idMarketingOrgan">
          <a-input v-model="entity.idMarketingOrgan" autocomplete="off" placeholder="idMarketingOrgan" />
        </a-form-model-item>
        <a-form-model-item label="idpartner" prop="idpartner">
          <a-input v-model="entity.idpartner" autocomplete="off" placeholder="idpartner" />
        </a-form-model-item>
        <a-form-model-item label="idunit" prop="idunit">
          <a-input v-model="entity.idunit" autocomplete="off" placeholder="idunit" />
        </a-form-model-item>
        <a-form-model-item label="idunitbymanufacture" prop="idunitbymanufacture">
          <a-input v-model="entity.idunitbymanufacture" autocomplete="off" placeholder="idunitbymanufacture" />
        </a-form-model-item>
        <a-form-model-item label="idUnitByPurchase" prop="idUnitByPurchase">
          <a-input v-model="entity.idUnitByPurchase" autocomplete="off" placeholder="idUnitByPurchase" />
        </a-form-model-item>
        <a-form-model-item label="idUnitByRetail" prop="idUnitByRetail">
          <a-input v-model="entity.idUnitByRetail" autocomplete="off" placeholder="idUnitByRetail" />
        </a-form-model-item>
        <a-form-model-item label="idUnitBySale" prop="idUnitBySale">
          <a-input v-model="entity.idUnitBySale" autocomplete="off" placeholder="idUnitBySale" />
        </a-form-model-item>
        <a-form-model-item label="idUnitByStock" prop="idUnitByStock">
          <a-input v-model="entity.idUnitByStock" autocomplete="off" placeholder="idUnitByStock" />
        </a-form-model-item>
        <a-form-model-item label="idunitgroup" prop="idunitgroup">
          <a-input v-model="entity.idunitgroup" autocomplete="off" placeholder="idunitgroup" />
        </a-form-model-item>
        <a-form-model-item label="idSubUnitByReport" prop="idSubUnitByReport">
          <a-input v-model="entity.idSubUnitByReport" autocomplete="off" placeholder="idSubUnitByReport" />
        </a-form-model-item>
        <a-form-model-item label="ExpiredUnit" prop="ExpiredUnit">
          <a-input v-model="entity.ExpiredUnit" autocomplete="off" placeholder="ExpiredUnit" />
        </a-form-model-item>
        <a-form-model-item label="idwarehouse" prop="idwarehouse">
          <a-input v-model="entity.idwarehouse" autocomplete="off" placeholder="idwarehouse" />
        </a-form-model-item>
        <a-form-model-item label="customerReplenishmentRule" prop="customerReplenishmentRule">
          <a-input v-model="entity.customerReplenishmentRule" autocomplete="off" placeholder="customerReplenishmentRule" />
        </a-form-model-item>
        <a-form-model-item label="pickbatchmethod" prop="pickbatchmethod">
          <a-input v-model="entity.pickbatchmethod" autocomplete="off" placeholder="pickbatchmethod" />
        </a-form-model-item>
        <a-form-model-item label="planattribute" prop="planattribute">
          <a-input v-model="entity.planattribute" autocomplete="off" placeholder="planattribute" />
        </a-form-model-item>
        <a-form-model-item label="productInfo" prop="productInfo">
          <a-input v-model="entity.productInfo" autocomplete="off" placeholder="productInfo" />
        </a-form-model-item>
        <a-form-model-item label="storeReplenishmentRule" prop="storeReplenishmentRule">
          <a-input v-model="entity.storeReplenishmentRule" autocomplete="off" placeholder="storeReplenishmentRule" />
        </a-form-model-item>
        <a-form-model-item label="taxRate" prop="taxRate">
          <a-input v-model="entity.taxRate" autocomplete="off" placeholder="taxRate" />
        </a-form-model-item>
        <a-form-model-item label="unittype" prop="unittype">
          <a-input v-model="entity.unittype" autocomplete="off" placeholder="unittype" />
        </a-form-model-item>
        <a-form-model-item label="valueType" prop="valueType">
          <a-input v-model="entity.valueType" autocomplete="off" placeholder="valueType" />
        </a-form-model-item>
        <a-form-model-item label="madeDate" prop="madeDate">
          <a-input v-model="entity.madeDate" autocomplete="off" placeholder="madeDate" />
        </a-form-model-item>
        <a-form-model-item label="updated" prop="updated">
          <a-input v-model="entity.updated" autocomplete="off" placeholder="updated" />
        </a-form-model-item>
        <a-form-model-item label="createdTime" prop="createdTime">
          <a-input v-model="entity.createdTime" autocomplete="off" placeholder="createdTime" />
        </a-form-model-item>
        <a-form-model-item label="Creater" prop="Creater">
          <a-input v-model="entity.Creater" autocomplete="off" placeholder="Creater" />
        </a-form-model-item>
        <a-form-model-item label="Changer" prop="Changer">
          <a-input v-model="entity.Changer" autocomplete="off" placeholder="Changer" />
        </a-form-model-item>
        <a-form-model-item label="Changedate" prop="Changedate">
          <a-input v-model="entity.Changedate" autocomplete="off" placeholder="Changedate" />
        </a-form-model-item>
        <a-form-model-item label="JinShuiCode" prop="JinShuiCode">
          <a-input v-model="entity.JinShuiCode" autocomplete="off" placeholder="JinShuiCode" />
        </a-form-model-item>
        <a-form-model-item label="IsModifiedCode" prop="IsModifiedCode">
          <a-input v-model="entity.IsModifiedCode" autocomplete="off" placeholder="IsModifiedCode" />
        </a-form-model-item>
        <a-form-model-item label="WithOutBargain" prop="WithOutBargain">
          <a-input v-model="entity.WithOutBargain" autocomplete="off" placeholder="WithOutBargain" />
        </a-form-model-item>
        <a-form-model-item label="idInventoryFreeItemClass0" prop="idInventoryFreeItemClass0">
          <a-input v-model="entity.idInventoryFreeItemClass0" autocomplete="off" placeholder="idInventoryFreeItemClass0" />
        </a-form-model-item>
        <a-form-model-item label="idInventoryFreeItemClass1" prop="idInventoryFreeItemClass1">
          <a-input v-model="entity.idInventoryFreeItemClass1" autocomplete="off" placeholder="idInventoryFreeItemClass1" />
        </a-form-model-item>
        <a-form-model-item label="idInventoryFreeItemClass2" prop="idInventoryFreeItemClass2">
          <a-input v-model="entity.idInventoryFreeItemClass2" autocomplete="off" placeholder="idInventoryFreeItemClass2" />
        </a-form-model-item>
        <a-form-model-item label="idInventoryFreeItemClass3" prop="idInventoryFreeItemClass3">
          <a-input v-model="entity.idInventoryFreeItemClass3" autocomplete="off" placeholder="idInventoryFreeItemClass3" />
        </a-form-model-item>
        <a-form-model-item label="idInventoryFreeItemClass4" prop="idInventoryFreeItemClass4">
          <a-input v-model="entity.idInventoryFreeItemClass4" autocomplete="off" placeholder="idInventoryFreeItemClass4" />
        </a-form-model-item>
        <a-form-model-item label="idInventoryFreeItemClass5" prop="idInventoryFreeItemClass5">
          <a-input v-model="entity.idInventoryFreeItemClass5" autocomplete="off" placeholder="idInventoryFreeItemClass5" />
        </a-form-model-item>
        <a-form-model-item label="idInventoryFreeItemClass6" prop="idInventoryFreeItemClass6">
          <a-input v-model="entity.idInventoryFreeItemClass6" autocomplete="off" placeholder="idInventoryFreeItemClass6" />
        </a-form-model-item>
        <a-form-model-item label="idInventoryFreeItemClass7" prop="idInventoryFreeItemClass7">
          <a-input v-model="entity.idInventoryFreeItemClass7" autocomplete="off" placeholder="idInventoryFreeItemClass7" />
        </a-form-model-item>
        <a-form-model-item label="idInventoryFreeItemClass8" prop="idInventoryFreeItemClass8">
          <a-input v-model="entity.idInventoryFreeItemClass8" autocomplete="off" placeholder="idInventoryFreeItemClass8" />
        </a-form-model-item>
        <a-form-model-item label="idInventoryFreeItemClass9" prop="idInventoryFreeItemClass9">
          <a-input v-model="entity.idInventoryFreeItemClass9" autocomplete="off" placeholder="idInventoryFreeItemClass9" />
        </a-form-model-item>
        <a-form-model-item label="InStorageUpLimit" prop="InStorageUpLimit">
          <a-input v-model="entity.InStorageUpLimit" autocomplete="off" placeholder="InStorageUpLimit" />
        </a-form-model-item>
        <a-form-model-item label="OutStorageUpLimit" prop="OutStorageUpLimit">
          <a-input v-model="entity.OutStorageUpLimit" autocomplete="off" placeholder="OutStorageUpLimit" />
        </a-form-model-item>
        <a-form-model-item label="AutoGenProject" prop="AutoGenProject">
          <a-input v-model="entity.AutoGenProject" autocomplete="off" placeholder="AutoGenProject" />
        </a-form-model-item>
        <a-form-model-item label="DefaultFreeItem0" prop="DefaultFreeItem0">
          <a-input v-model="entity.DefaultFreeItem0" autocomplete="off" placeholder="DefaultFreeItem0" />
        </a-form-model-item>
        <a-form-model-item label="DefaultFreeItem1" prop="DefaultFreeItem1">
          <a-input v-model="entity.DefaultFreeItem1" autocomplete="off" placeholder="DefaultFreeItem1" />
        </a-form-model-item>
        <a-form-model-item label="DefaultFreeItem2" prop="DefaultFreeItem2">
          <a-input v-model="entity.DefaultFreeItem2" autocomplete="off" placeholder="DefaultFreeItem2" />
        </a-form-model-item>
        <a-form-model-item label="DefaultFreeItem3" prop="DefaultFreeItem3">
          <a-input v-model="entity.DefaultFreeItem3" autocomplete="off" placeholder="DefaultFreeItem3" />
        </a-form-model-item>
        <a-form-model-item label="DefaultFreeItem4" prop="DefaultFreeItem4">
          <a-input v-model="entity.DefaultFreeItem4" autocomplete="off" placeholder="DefaultFreeItem4" />
        </a-form-model-item>
        <a-form-model-item label="DefaultFreeItem5" prop="DefaultFreeItem5">
          <a-input v-model="entity.DefaultFreeItem5" autocomplete="off" placeholder="DefaultFreeItem5" />
        </a-form-model-item>
        <a-form-model-item label="DefaultFreeItem6" prop="DefaultFreeItem6">
          <a-input v-model="entity.DefaultFreeItem6" autocomplete="off" placeholder="DefaultFreeItem6" />
        </a-form-model-item>
        <a-form-model-item label="DefaultFreeItem7" prop="DefaultFreeItem7">
          <a-input v-model="entity.DefaultFreeItem7" autocomplete="off" placeholder="DefaultFreeItem7" />
        </a-form-model-item>
        <a-form-model-item label="DefaultFreeItem8" prop="DefaultFreeItem8">
          <a-input v-model="entity.DefaultFreeItem8" autocomplete="off" placeholder="DefaultFreeItem8" />
        </a-form-model-item>
        <a-form-model-item label="DefaultFreeItem9" prop="DefaultFreeItem9">
          <a-input v-model="entity.DefaultFreeItem9" autocomplete="off" placeholder="DefaultFreeItem9" />
        </a-form-model-item>
        <a-form-model-item label="BackflushMaterial" prop="BackflushMaterial">
          <a-input v-model="entity.BackflushMaterial" autocomplete="off" placeholder="BackflushMaterial" />
        </a-form-model-item>
        <a-form-model-item label="SaleReturnPercentRate" prop="SaleReturnPercentRate">
          <a-input v-model="entity.SaleReturnPercentRate" autocomplete="off" placeholder="SaleReturnPercentRate" />
        </a-form-model-item>
        <a-form-model-item label="IsEshop" prop="IsEshop">
          <a-input v-model="entity.IsEshop" autocomplete="off" placeholder="IsEshop" />
        </a-form-model-item>
        <a-form-model-item label="WorkingHours" prop="WorkingHours">
          <a-input v-model="entity.WorkingHours" autocomplete="off" placeholder="WorkingHours" />
        </a-form-model-item>
      </a-form-model>
    </a-spin>
  </a-modal>
</template>

<script>
export default {
  props: {
    parentObj: {
      type: Object,
      default () {
        return {}
      }
    }
  },
  data () {
    return {
      layout: {
        labelCol: { span: 5 },
        wrapperCol: { span: 18 }
      },
      visible: false,
      loading: false,
      entity: {},
      rules: {},
      title: ''
    }
  },
  methods: {
    init () {
      this.visible = true
      this.entity = {}
      this.$nextTick(() => {
        this.$refs['form'].clearValidate()
      })
    },
    openForm (id, title) {
      this.init()
      this.title = title
      if (id) {
        this.loading = true
        this.$http.post('/MaterialManagement/aa_inventory/GetTheData', { id: id }).then(resJson => {
          this.loading = false
          this.entity = resJson.Data
        })
      }
    },
    handleSubmit () {
      this.$refs['form'].validate(valid => {
        if (!valid) {
          return
        }
        this.loading = true
        this.$http.post('/MaterialManagement/aa_inventory/SaveData', this.entity).then(resJson => {
          this.loading = false
          if (resJson.Success) {
            this.$message.success('操作成功!')
            this.loading = false
            this.visible = false
	        this.$emit('returnMain')
          } else {
            this.$message.error(resJson.Msg)
            this.loading = false
          }
        })
      })
    },
    // 非空校验
    validEmpty (index, name, tips) {
      return (rule, value, callback) => {
        const data = this.DetaiData[index][name]
        if (!data) {
          this.$message.warning('列表第' + (index + 1) + '行：' + tips)
          callback(tips || '必填')
        } else {
          callback()
        }
      }
    }
  }
}
</script>
<style scoped>
</style>
